package com.example.dirviesystem.coach.service;

import com.example.dirviesystem.entity.DrivingType;
import com.example.dirviesystem.repository.DrivingTypeRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DrivingTypeService {

    @Autowired
    private DrivingTypeRepository drivingTypeRepository;

    public List<DrivingType> findAll() {
        return drivingTypeRepository.findAll();
    }

    public DrivingType findByCode(String code) {
        return drivingTypeRepository.findByCode(code);
    }
}